package com.gw.smscheck.service.business.callrecords.impl;

import java.util.List;

import com.gw.smscheck.entity.business.alarm.AlarmLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gw.smscheck.dao.business.callrecords.CallRecordsMapper;
import com.gw.smscheck.entity.business.callrecords.CallRecords;
import com.gw.smscheck.service.business.callrecords.CallRecordsService;
@Service
public class CallRecordsServiceImpl implements CallRecordsService {
	@Autowired
	private CallRecordsMapper callRecordsMapper;
	@Override
	public Integer add(CallRecords callRecords) {
		return callRecordsMapper.add(callRecords);
	}
	@Override
	public List<CallRecords> findAll() {
		return callRecordsMapper.findAll();
	}
	@Override
	public PageInfo<CallRecords> pageSelect(CallRecords dto) {
		PageHelper.startPage(dto.getPage(), dto.getRows(), "create_time desc");// 排序
		List<CallRecords> resultList = callRecordsMapper.pageSelect(dto);
		PageInfo<CallRecords> pageInfo = new PageInfo<>(resultList);
		return pageInfo;
	}
	@Override
	public CallRecords findById(Integer dto) {
		return callRecordsMapper.findById(dto);
	}
	@Override
	public List<CallRecords> findByPhone(CallRecords dto) {

		return callRecordsMapper.findByPhone(dto);
	}
	@Override
	public Integer update(CallRecords callRecords) {
		return callRecordsMapper.update(callRecords);
	}
	@Override
	public Integer delByIds(String[] ids) {
		return callRecordsMapper.delByIds(ids);
	}
	@Override
	public List<CallRecords> fingCallRecordsOut(CallRecords dto) {

		return callRecordsMapper.fingCallRecordsOut(dto);
	}
	@Override
	public List<CallRecords> fingCallRecordsIn(CallRecords dto) {

		return callRecordsMapper.fingCallRecordsIn(dto);
	}
}

